package com.znz.analysis.bean;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;

/**
 * @author 作者 :TP
 * @version 创建时间：2017年6月22日 上午1:10:17
 *
 */
public class Location implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8680603818232396617L;
	private String country;
	private String province;
	private String city;

	public String getCountry() {
		if (StringUtils.isBlank(country)) {
			return "";
		}
		return country;
	}  

	public void setCountry(String country) {
		if (country == null) {
			this.country = "";
		} else {
			this.country = country;
		}
	}

	public String getProvince() {
		if (StringUtils.isBlank(province)) {
			return "";
		}
		return province;
	}

	public void setProvince(String province) {
		if (province == null) {
			this.province = "";
		} else {
			this.province = province;
		}
	}

	public String getCity() {
		if (StringUtils.isBlank(city)) {
			return "";
		}
		return city;
	}

	public void setCity(String city) {
		if (city == null) {
			this.city = "";
		} else {
			this.city = city;
		}
	}

	@Override
	public String toString() {
		return this.getCountry() + "--" + this.getProvince() + "--" + this.getCity();
	}

	public String toString(boolean isIgnoreCity) {
		if (isIgnoreCity) {
			return this.getCountry() + "--" + this.getProvince();
		} else {
			return this.toString();
		}
	}

}
